package CartService

import (
	"context"
	"database/sql"
	toolsDb "gdshop-back-end-go/common/db"
	"github.com/gogf/gf/frame/g"
	"time"
)

func BaseDel(ctx context.Context, cartId int, memberId int) (result sql.Result, err error) {
	return toolsDb.GetUnSafaTableAddDeleteWhere(ctx, "member_cart").Where(
		"member_id=? AND id=?",
		memberId,
		cartId,
	).Update(g.Map{
		"delete_at": int(time.Now().Unix()),
	})
}
